﻿namespace System.Modules.Constants.FormattingTypes
{
    /// <summary>
    /// You can create a custom numeric format string, which consists of one or more custom numeric specifiers, to define how to format numeric data. A custom numeric format string is any format string that is not a standard numeric format string. 
    /// Custom numeric format strings are supported by some overloads of the ToString method of all numeric types. For example, you can supply a numeric format string to the ToString(String) and ToString(String, IFormatProvider) methods of the Int32 type. Custom numeric format strings are also supported by the .NET Framework composite formatting feature, which is used by some Write and WriteLine methods of the Console and StreamWriter classes, the String.Format method, and the StringBuilder.AppendFormat method.
    /// </summary>
    public class CustomNumericFormat
    {
        /// <summary>
        /// Replaces the zero with the corresponding digit if one is present; otherwise, zero appears in the result string.
        /// More information: The "0" Custom Specifier.
        /// </summary>
        /// <example>
        /// 1234.5678 ("00000") -> 01235
        /// 0.45678 ("0.00", en-US) -> 0.46
        /// 0.45678 ("0.00", fr-FR) -> 0,46
        /// </example>
        public const string ZERO_PLACEHOLDER = "0";
        /// <summary>
        /// Replaces the "#" symbol with the corresponding digit if one is present; otherwise, no digit appears in the result string.
        /// More information: The "#" Custom Specifier.
        /// </summary>
        /// <example>
        /// 1234.5678 ("#####") -> 1235
        /// 0.45678 ("#.##", en-US) -> .46
        /// 0.45678 ("#.##", fr-FR) -> ,46
        /// </example>
        public const string DIGIT_PLACEHOLDER = "0";
        /// <summary>
        /// Determines the location of the decimal separator in the result string.
        /// More information: The "." Custom Specifier.
        /// </summary>
        /// <example>
        /// 0.45678 ("0.00", en-US) -> 0.46
        /// 0.45678 ("0.00", fr-FR) -> 0,46
        /// </example>
        public const string DECIMAL_POINT = "0";
        /// <summary>
        /// Serves as both a group separator and a number scaling specifier. As a group separator, it inserts a localized group separator character between each group. As a number scaling specifier, it divides a number by 1000 for each comma specified.
        /// More information: The "," Custom Specifier.
        /// </summary>
        /// <example>
        /// Group separator specifier:
        /// 2147483647 ("##,#", en-US) -> 2,147,483,647
        /// 2147483647 ("##,#", es-ES) -> 2.147.483.647
        /// Scaling specifier:
        /// 2147483647 ("#,#,,", en-US) -> 2,147
        /// 2147483647 ("#,#,,", es-ES) -> 2.147
        /// </example>
        public const string GROUP_SEPERATOR_AND_NUMBER_SCALING = "0";
        /// <summary>
        /// Multiplies a number by 100 and inserts a localized percentage symbol in the result string.
        /// More information: The "%" Custom Specifier.
        /// </summary>
        /// <example>
        /// 0.3697 ("%#0.00", en-US) -> %36.97
        /// 0.3697 ("%#0.00", el-GR) -> %36,97
        /// 0.3697 ("##.0 %", en-US) -> 37.0 %
        /// 0.3697 ("##.0 %", el-GR) -> 37,0 %
        /// </example>
        public const string PERCENTAGE_PLACEHOLDER = "0";
        /// <summary>
        /// Multiplies a number by 1000 and inserts a localized per mille symbol in the result string. 
        /// More information: The "‰" Custom Specifier.
        /// </summary>
        /// <example>
        /// 0.03697 ("#0.00‰", en-US) -> 36.97‰
        /// 0.03697 ("#0.00‰", ru-RU) -> 36,97‰
        /// </example>
        public const string PER_MILE_PLACEHOLDER = "‰";
        /// <summary>
        /// If followed by at least one 0 (zero), formats the result using exponential notation. The case of "E" or "e" indicates the case of the exponent symbol in the result string. The number of zeros following the "E" or "e" character determines the minimum number of digits in the exponent. A plus sign (+) indicates that a sign character always precedes the exponent. A minus sign (-) indicates that a sign character precedes only negative exponents.
        /// More information: The "E" and "e" Custom Specifiers.
        /// </summary>
        /// <example>
        /// 987654 ("#0.0e0") -> 98.8e4
        /// 1503.92311 ("0.0##e+00") -> 1.504e+03
        /// 1.8901385E-16 ("0.0e+00") -> 1.9e-16
        /// </example>
        public const string EXPONENTIAL_NOTATION = "E0";
        /// <summary>
        /// If followed by at least one 0 (zero), formats the result using exponential notation. The case of "E" or "e" indicates the case of the exponent symbol in the result string. The number of zeros following the "E" or "e" character determines the minimum number of digits in the exponent. A plus sign (+) indicates that a sign character always precedes the exponent. A minus sign (-) indicates that a sign character precedes only negative exponents.
        /// More information: The "E" and "e" Custom Specifiers.
        /// </summary>
        /// <example>
        /// 987654 ("#0.0e0") -> 98.8e4
        /// 1503.92311 ("0.0##e+00") -> 1.504e+03
        /// 1.8901385E-16 ("0.0e+00") -> 1.9e-16
        /// </example>
        public const string EXPONENTIAL_NOTATION_PLUS = "E+0";
        /// <summary>
        /// If followed by at least one 0 (zero), formats the result using exponential notation. The case of "E" or "e" indicates the case of the exponent symbol in the result string. The number of zeros following the "E" or "e" character determines the minimum number of digits in the exponent. A plus sign (+) indicates that a sign character always precedes the exponent. A minus sign (-) indicates that a sign character precedes only negative exponents.
        /// More information: The "E" and "e" Custom Specifiers.
        /// </summary>
        /// <example>
        /// 987654 ("#0.0e0") -> 98.8e4
        /// 1503.92311 ("0.0##e+00") -> 1.504e+03
        /// 1.8901385E-16 ("0.0e+00") -> 1.9e-16
        /// </example>
        public const string EXPONENTIAL_NOTATION_MINUS = "E-0";
        /// <summary>
        /// Causes the next character to be interpreted as a literal rather than as a custom format specifier. 
        /// More information: The "\" Escape Character.
        /// </summary>
        /// <example>
        /// 987654 ("\###00\#") -> #987654#
        /// </example>
        public const string ESCAPE_CHARACTER = @"\";
        /// <summary>
        /// Indicates that the enclosed characters should be copied to the result string unchanged.
        /// </summary>
        /// <example>
        /// 68 ("# ' degrees'") -> 68 degrees
        /// 68 ("#' degrees'") -> 68 degrees
        /// </example>
        public const string LITERAL_STRING_DELIMITER = "'{0}'";
        /// <summary>
        /// Defines sections with separate format strings for positive, negative, and zero numbers. 
        /// More information: The ";" Section Separator.
        /// </summary>
        /// <example>
        /// 12.345 ("#0.0#;(#0.0#);-\0-") -> 12.35
        /// 0 ("#0.0#;(#0.0#);-\0-") -> -0-
        /// -12.345 ("#0.0#;(#0.0#);-\0-") -> (12.35)
        /// 12.345 ("#0.0#;(#0.0#)") -> 12.35
        /// 0 ("#0.0#;(#0.0#)") -> 0.0
        /// -12.345 ("#0.0#;(#0.0#)") -> (12.35)
        /// </example>
        public const string SECTION_SEPERATOR = ";";
    }
}
